﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Reflection;
using ZXCompany.Models.Entity;
namespace ZXCompany.Controllers
{
    public class ContactController : Controller
    {
        private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
        public Models.Service.ServiceFactory SerFac = new Models.Service.ServiceFactory();
        //
        // GET: /Contact/
        /// <summary>
        /// 联系我们
        /// </summary>
        /// <returns></returns>
        
        public ActionResult Index()
        {
            try
            {
                //ViewData["Message"] = "欢迎使用 ASP.NET MVC!";mainmenu_a/activemenu
                //网站首页
                ViewData["IndexTitleClass"] = "mainmenu_a";
                //关于我们
                ViewData["AboutTitleClass"] = "mainmenu_a";
                //业务领域
                ViewData["BusinessTitleClass"] = "mainmenu_a";
                //解决方案
                ViewData["SolutionTitleClass"] = "mainmenu_a";
                //动态前沿
                ViewData["ActiveTitleClass"] = "mainmenu_a";
                //联系我们
                ViewData["ContUsTitleClass"] = "activemenu";
                ZX_CompanyContact comp = SerFac.GetAccount().CompanyContactSelect();
                ViewData["comp"] = comp;

                return View();
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                return View("Error");
            }
        }


        /// <summary>
        /// 在线留言
        /// </summary>
        /// <returns></returns>

        public ActionResult OnLineSay()
        {
            try
            {
                //ViewData["Message"] = "欢迎使用 ASP.NET MVC!";mainmenu_a/activemenu
                //网站首页
                ViewData["IndexTitleClass"] = "mainmenu_a";
                //关于我们
                ViewData["AboutTitleClass"] = "mainmenu_a";
                //业务领域
                ViewData["BusinessTitleClass"] = "mainmenu_a";
                //解决方案
                ViewData["SolutionTitleClass"] = "mainmenu_a";
                //动态前沿
                ViewData["ActiveTitleClass"] = "mainmenu_a";
                //联系我们
                ViewData["ContUsTitleClass"] = "activemenu";
                return View();
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                return View("Error");
            }
        }

    }
}
